Back


Goal 5: Gender equality

Average income


GS Average income by gender, place of residence and education
INXPI104_raw <- 
  "INXPI104" %>% 
  statgl_url(lang = language) %>% 
  statgl_fetch(
    "level of education" = px_all(),
    unit                 = 3,
    gender               = 1:2,
    age                  = c(0, 4),
    "type of income"     = 1,
    time                 = px_all(),
    .col_code            = TRUE
    ) %>% 
  as_tibble()


INXPI104 <- 
  INXPI104_raw %>%
  filter(
    value != "NA",
    age   == unique(INXPI104_raw %>% pull(age))[1]
    ) %>% 
  rename(
    "edu"  = `level of education`,
    "type" = `type of income`
    ) %>% 
  mutate(
    edu  = edu %>% fct_inorder(),
    type = type %>%  str_remove_all("[:digit:]|[:punct:]|\\+") %>% trimws()
    )

INXPI104 %>% 
  ggplot(aes(
    x     = time %>% as.numeric(),
    y     = value,
    color = gender %>% fct_rev()
  )) +
  geom_line(size = 2) +
  facet_wrap(~ edu) +
  theme_statgl() +
  scale_color_statgl() +
  scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
  scale_x_continuous(breaks = scales:: pretty_breaks()) + 
  labs(
    title    = INXPI104 %>% pull(type) %>% unique(),
    subtitle = INXPI104 %>% pull(unit) %>% unique(),
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg5$figs$fig1$cap[language]
  )

StatBank

Method


tab <- 
  INXPI104 %>% 
  filter(time >= Sys.time() %>% year() - 7) %>% 
  mutate(time = time %>% fct_rev()) %>% 
  spread(time, value) %>% 
  select(-age)
  

tab %>% 
  select(-c(edu, unit, type)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["type"]] %>%  table()) %>% 
  pack_rows(index = tab[["edu"]] %>% table()) %>% 
  add_footnote(tab %>% pull(unit) %>% unique(), notation = "symbol")
2022 2021 2020 2019 2018 2017
Pretax Income total
Basic scool 8-10 grade
Men 234.135 221.379 221.751 220.133 219.867 212.780
Woman 172.329 168.006 162.850 159.522 155.738 152.098
Upper secondary school
Men 348.357 322.442 306.486 307.544 306.674 310.075
Woman 233.118 206.330 200.436 195.745 188.368 186.094
Vocational education
Men 417.861 398.507 402.334 386.489 381.560 370.171
Woman 295.870 281.768 274.182 272.668 265.089 257.890
Short-cycle higher education
Men 349.507 338.797 317.874 331.182 307.996 296.458
Woman 320.252 306.207 302.860 302.482 294.940 291.796
Medium-cycle higher education, Bachelors
Men 554.668 548.204 528.469 535.014 530.823 555.195
Woman 446.885 436.757 415.822 410.472 405.119 416.966
Long-cycle higher education
Men 768.439 767.868 757.895 765.664 713.391 780.811
Woman 618.724 606.830 590.392 578.418 561.255 613.203
* Average income for persons with type of income (DKK)
INXPI104 <- 
  INXPI104_raw %>%
  filter(
    value != "NA",
    age   == unique(INXPI104_raw %>% pull(age))[2]
  ) %>% 
  rename(
    "edu"  = `level of education`,
    "type" = `type of income`
  ) %>% 
  mutate(
    edu  = edu %>% fct_inorder(),
    type = type %>%  str_remove_all("[:digit:]|[:punct:]|\\+") %>% trimws()
  )

INXPI104 %>% 
  ggplot(aes(
    x     = time %>% as.numeric(),
    y     = value,
    color = gender %>% fct_rev()
  )) +
  geom_line(size = 2) +
  facet_wrap(~ edu) +
  theme_statgl() +
  scale_color_statgl() +
  scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
  scale_x_continuous(breaks = scales:: pretty_breaks()) + 
  labs(
    title    = paste0(
      INXPI104 %>% pull(type) %>% unique(), ", ", 
      INXPI104 %>% pull(age) %>% unique()
    ),
    subtitle = INXPI104 %>% pull(unit) %>% unique(),
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg5$figs$fig1$cap[language]
  )

StatBank

Method


tab <- 
  INXPI104 %>% 
  filter(time >= Sys.time() %>% year() - 7) %>% 
  mutate(time = time %>% fct_rev()) %>% 
  spread(time, value) %>% 
  unite(type, type, age, sep = ", ")


tab %>% 
  select(-c(edu, unit, type)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["type"]] %>%  table()) %>% 
  pack_rows(index = tab[["edu"]] %>% table()) %>% 
  add_footnote(tab %>% pull(unit) %>% unique(), notation = "symbol")
2022 2021 2020 2019 2018 2017
Pretax Income total, 30-34 years
Basic scool 8-10 grade
Men 250.832 235.607 226.090 229.122 220.892 208.084
Woman 176.076 171.912 165.499 161.197 158.658 155.093
Upper secondary school
Men 299.808 294.967 289.586 313.604 273.332 301.519
Woman 208.197 206.114 192.447 188.873 187.006 176.472
Vocational education
Men 408.290 381.070 357.371 347.546 331.054 325.784
Woman 280.832 268.671 260.461 266.763 256.601 249.524
Short-cycle higher education
Men 348.301 342.909 306.309 294.879 347.271 336.414
Woman 262.814 220.418 222.469 208.038 226.267 233.077
Medium-cycle higher education, Bachelors
Men 505.500 505.478 473.930 446.026 436.353 432.105
Woman 387.396 378.566 359.046 359.464 360.720 376.074
Long-cycle higher education
Men 525.041 504.234 522.714 483.043 472.560 501.613
Woman 485.566 473.687 472.983 460.440 441.388 492.136
* Average income for persons with type of income (DKK)

Distribution of elected representatives by sex


FN 5.5.1 Proportion of female parlamentarians in the national parliament
# Import
ELEC03_raw <- 
  "https://pxweb.nordicstatistics.org:443/sq/6c4d7add-c65a-43ab-a60a-0119c13f9bd6.csv" |> 
  read.csv() |> 
  as_tibble()

vec <- 1:21
names(vec) <- c("country", 2003:2022)

# Transform
ELEC03 <- 
  ELEC03_raw |> 
  rename(vec) |> 
  mutate(across(everything(), as.numeric),
         country = "greenland") |> 
  pivot_longer(cols = c("2003", "2004", "2005", "2006", "2007", "2008", "2009", 
                        "2010", "2011", "2012", "2013", "2014", "2015", "2016",
                        "2017", "2018", "2019", "2020", "2021", "2022"),
               names_to = "time",
               values_to = "value") |> 
  drop_na(value)

# Plot
ELEC03 |> 
  ggplot(aes(
    x = time,
    y = value,
    fill = country
  )) +
  geom_col() +
  theme_statgl() +
  scale_fill_statgl() +
  theme(legend.position = "none") +
  labs(
    title   = sdg5$figs$fig2$title[language],
    x       = " ",
    y       = sdg5$figs$fig2$y_lab[language],
    fill    = " ",
    caption = sdg5$figs$fig2$cap[language]
  )

Nordic Statistics

Method


col0 <- sdg5$figs$fig2$col0[language]

# Tabel
ELEC03 |> 
  spread(time, value) |> 
  mutate(country = col0) |> 
  rename(" " = 1) |> 
  statgl_table() |> 
  add_footnote(sdg5$figs$fig2$foot[language], notation = "symbol")
X2023 2005 2009 2013 2014 2015 2016 2017 2018 2020 2021
Amount of women NA 42 29 41 43 33 33 31 42 47 32
* Situation by end of the year

Economically disadvantaged


GS Proportion of economically disadvantaged by gender
# Import 
SOXOU01_raw <-
  statgl_url("SOXOU01", lang = language) %>%
  statgl_fetch(
    "inventory variable" = c("Andel50", "Andel60"),
    gender               = 1:2,
    year                 = px_all(),
    .col_code            = TRUE
    ) %>% 
    as_tibble()

# Transform
SOXOU01 <-
  SOXOU01_raw %>% 
  mutate(
    year   = year %>%  make_date(),
    gender = gender %>% fct_inorder()
    )

# Plot
SOXOU01 %>% 
  mutate(`inventory variable` = `inventory variable` %>% str_to_sentence()) %>% 
  ggplot(aes(
    x    = year,
    y    = value,
    fill = gender)) +
  geom_col(position = "dodge") +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ",")
    ) +
  facet_wrap(~ `inventory variable`) +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE) +
  labs(
    title    = sdg5$figs$fig3$title[language],
    subtitle = sdg5$figs$fig3$sub[language],
    x        = " ", 
    y        = " ", 
    fill     = " ",
    caption  = sdg5$figs$fig3$cap[language]
  )

StatBank

Method


# Transform
SOXOU01 <-
  SOXOU01_raw %>% 
  arrange(desc(year)) %>% 
  filter(year >= year(Sys.time()) - 5) %>% 
  mutate(year = year %>% fct_inorder()) %>% 
  unite(combi, 1, 2, sep = ",") %>% 
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(1, 3)

vec      <- SOXOU01[-1] %>% colnames() %>% str_split(",") %>% unlist() %>% str_to_sentence()
head_vec <- vec[c(T, F)] %>% table()
col_vec  <- vec[c(F, T)]

# Table
SOXOU01 %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  add_footnote(
    sdg5$figs$fig3$foot[language],
    notation = "symbol"
    )
Fraction below 50%
Fraction below 60%
fraction below 50%,Female fraction below 50%,Male fraction below 60%,Female fraction below 60%,Male
2022 4,3 5,0 8,4 9,2
2021 4,0 4,5 7,9 8,3
2020 3,7 4,5 7,3 8,1
2019 3,5 4,1 7,0 7,8
* Proportion below 50 or 60% of median income

Grade test results


GS Grade test results by gender
# Import
UDXTKK_raw <-
  statgl_url("UDXTKK", lang = language) %>%
  statgl_fetch(subject   = px_all(),
               grade     = px_all(),
               sex       = 1:2,
               unit      = "B",
               time      = px_all(),
               .col_code = TRUE
               ) %>% 
    as_tibble()

# Transform
UDXTKK <- 
  UDXTKK_raw %>% 
  mutate(
    time     = time %>% make_date(),
     subject =  subject %>% fct_inorder()
    )

fig_legend   <- statgl_url("UDXTKK", lang = language) %>% statgl_fetch() %>% select(1) %>% colnames()
fig_title    <- (statgl_url("UDXTKK", lang = language) %>% statgl_meta())$title
fig_subtitle <- UDXTKK_raw[["unit"]] %>% unique()
  
# Plot
UDXTKK %>% 
  ggplot(aes(
    x = time,
    y = value,
    color = subject
  )) +
  geom_line(size = 2) +
  facet_grid(grade ~ sex) +
  theme_statgl() + 
  scale_color_statgl() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = fig_title,
    subtitle = fig_subtitle,
    x        = " ",
    y        = " ",
    color    = fig_legend,
    caption  = sdg5$figs$fig4$cap[language]
  )

StatBank

Method


UDXTKK <- 
  UDXTKK_raw %>% 
  mutate(
    subject = subject %>% fct_inorder(),
    grade   = grade %>% fct_inorder(),
    sex     = sex %>% fct_inorder()
    ) %>% 
  arrange(subject, time) %>% 
  unite(combi, 2, 1, 3, sep = ",") %>% 
  spread(1, 4) %>% 
  arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5)

vec       <- UDXTKK %>% select(-(1:2)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec1 <- rep((vec[c(F, T, F)])[1:8] %>% table(), 2)
head_vec2 <- vec[c(T, F, F)] %>% table()
col_vec   <- vec[c(F, F, T)] 

# Table
UDXTKK %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  mutate_all(~replace(., is.na(.), 0)) %>% 
  statgl_table(col.names = c(" ", col_vec),
               replace_0s = TRUE) %>% 
  add_header_above(c(" ", head_vec1)) %>% 
  add_header_above(c(" ", head_vec2)) %>% 
  pack_rows(index = UDXTKK[["unit"]] %>% table())
3rd grade
7th grade
Danish
English
Greenlandic
Mathematics
Danish
English
Greenlandic
Mathematics
3rd grade,Danish,Boys 3rd grade,Danish,Girls 3rd grade,English,Boys 3rd grade,English,Girls 3rd grade,Greenlandic,Boys 3rd grade,Greenlandic,Girls 3rd grade,Mathematics,Boys 3rd grade,Mathematics,Girls 7th grade,Danish,Boys 7th grade,Danish,Girls 7th grade,English,Boys 7th grade,English,Girls 7th grade,Greenlandic,Boys 7th grade,Greenlandic,Girls 7th grade,Mathematics,Boys 7th grade,Mathematics,Girls
Problem-solving proficiency (pct. correct)
2023 45 48 0 0 48 48 56 48 42 50 82 90 54 64 41 42
2022 39 44 0 0 40 43 48 48 44 59 75 86 57 66 41 41
2021 46 48 0 0 45 50 53 49 47 59 71 76 54 66 41 38
2020 49 50 0 0 40 48 53 48 54 60 73 73 57 65 41 42
2019 50 59 0 0 39 50 51 52 48 60 53 67 61 70 40 43

Grade point average in lower secondary education


GS Marks by gender
# Import
UDXFKK_raw <-
  statgl_url("UDXFKK", lang = language) %>% 
  statgl_fetch(unit             = "Avg",
               grade            = "FO",
               subject          = c("01", "02", "03", "04"),
               "type of grades" = 56:58,
               sex              = 1:2,
               time             = px_all(),
               .col_code = TRUE) %>% 
    as_tibble()

# Transform
UDXFKK <-
  UDXFKK_raw %>% 
  separate(`type of grades`, c("split1", "split2"),  " - ") %>% 
  mutate(split2 = split2 %>% str_to_title(),
         split1 = split1 %>% str_to_lower(),
         time = time %>% make_date()) %>% 
  unite(combi, 2, 4, sep = ", ")

fig_title    <- (statgl_url("UDXFKK", lang = language) %>% statgl_meta())$title
fig_y        <- UDXFKK[["unit"]] %>% unique() %>% str_to_title()
fig_subtitle <- UDXFKK[["combi"]] %>% unique()

# Plot
UDXFKK %>% 
  ggplot(aes(
    x     = time,
    y     = value, 
    color = sex
    )) +
  geom_line(size = 1.5) +
  facet_grid(split2 ~ subject) +
  scale_y_continuous(labels = scales::unit_format(
    suffix       = " ",
    big.mark     = ".",
    decimal.mark = ",", 
    accuracy     = 1
    )) +
  theme_statgl() + 
  scale_color_statgl(guide = guide_legend(reverse = TRUE)) +
  labs(
    title    = fig_title,
    subtitle = fig_subtitle,
    x        = " ",
    y        = fig_y,
    color    = " ",
    caption  = sdg5$figs$fig5$cap[language]
  )

StatBank

Method


# Transform
UDXFKK <-
  UDXFKK_raw %>% 
  filter(time >= year(Sys.Date()) - 6,
         value != "NA") %>% 
  separate(`type of grades`, c("split1", "split2"),  " - ") %>% 
  mutate(split2 = split2 %>% str_to_title(),
         split1 = split1 %>% str_to_lower()) %>% 
  unite(combi1, 2, 4, sep = ", ") %>% 
  unite(combi2, 3, 4, sep = ",") %>% 
  spread(3, ncol(.)) %>% 
  arrange(desc(time))

vec      <- UDXFKK %>% select(-(1:4)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(T, F)] %>% table()
col_vec  <- vec[c(F, T)]

# Table
UDXFKK %>% 
  select(-(1:2), -4) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = UDXFKK[[1]] %>% str_to_title() %>% table()) %>% 
  pack_rows(index = UDXFKK[["time"]] %>% table() %>% rev()) %>% 
  add_footnote(UDXFKK[[2]] %>% unique(),
               notation = "symbol")
Danish
English
Greenlandic
Mathematics
Danish,Oral Danish,Proficiency Test Danish,Written English,Oral English,Proficiency Test English,Written Greenlandic,Oral Greenlandic,Proficiency Test Greenlandic,Written Mathematics,Oral Mathematics,Proficiency Test Mathematics,Written
Grade Point Average
2023
Boys 6,16 3,92 3,39 6,60 5,60 4,39 6,30 3,50 3,84 5,81 5,14 2,89
Girls 6,13 4,18 4,28 7,34 5,52 4,73 6,74 4,49 5,65 5,37 4,49 3,07
2022
Boys 3,86 3,43 2,78 6,27 4,76 3,82 5,87 3,37 4,60 5,26 4,95 2,41
Girls 5,55 4,71 4,22 6,74 5,55 5,07 7,49 3,98 6,18 5,22 4,84 2,61
2021
Boys 4,89 3,93 2,59 6,66 4,73 3,75 5,67 3,11 4,18 4,79 5,06 2,16
Girls 5,74 4,93 4,00 6,36 5,03 4,40 6,21 3,94 6,31 4,94 4,84 2,17
2019
Boys 3,63 4,31 3,30 4,72 4,52 3,28 5,32 4,21 3,72 4,64 5,33 2,18
Girls 5,75 5,74 4,83 5,81 5,58 4,69 7,65 5,24 5,90 4,60 5,06 2,69
2018
Boys 4,13 4,32 3,20 3,32 4,73 3,05 5,33 5,07 4,15 5,37 5,39 2,05
Girls 4,47 4,92 4,44 4,46 5,26 3,98 6,69 6,29 6,41 5,20 5,01 2,18
* School leavers - lower secondary education, mark


Due to Covid-19 there has not been held final exams in 2020.

Highest educational attainment


GS Highest educational attainment among 35-39 year olds by gender
# Import
UDXISCPROD_raw <-
  statgl_url("UDXISCPROD", lang = language) %>% 
  statgl_fetch("level of education" = px_all(),
               gender               = px_all(),
               time                 = px_all(),
               age                  = "35-39",
               .col_code = TRUE) %>% 
  as_tibble()

# Transform
UDXISCPROD <-
  UDXISCPROD_raw %>% 
  filter(`level of education` != UDXISCPROD_raw[[2]][1]) %>% 
  mutate(
    `level of education` = `level of education` %>% factor(level = unique(`level of education`) %>% rev()),
    time                 = time %>% make_date()
    )

# Plot
UDXISCPROD %>% 
  arrange(`level of education`) %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = `level of education`
  )) +
  geom_area(position = "fill") +
  facet_wrap(~ gender) +
  scale_y_continuous(labels = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl(base_size = 11) +
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = TRUE, nrow = 3)) +
  labs(
    title    = sdg5$figs$fig6$title[language],
    subtitle = unique(UDXISCPROD[["age"]]),
    x        = " ",
    y        = " ",
    fill     = NULL,
    caption  = sdg5$figs$fig6$cap[language]
  )

StatBank

Method


UDXISCPROD <- 
  UDXISCPROD_raw %>% 
  filter(
    `level of education` != UDXISCPROD_raw[[2]][1],
    time > year(Sys.Date()) - 7
    ) %>% 
  mutate(
    `level of education` = `level of education` %>% factor(levels = unique(`level of education`))
    ) %>% 
  arrange(`level of education`, desc(time)) %>% 
  unite(combi, 3, 4, sep = "-") %>% 
  mutate(combi = combi %>% factor(level = unique(combi))) %>% 
  spread(3, 4, sep = "-")

vec      <- (UDXISCPROD %>% select(-(1:2)) %>% colnames() %>% str_split("-") %>% unlist())[c(F, T, T)]
head_vec <- vec[c(F, T)] %>% table() %>% rev()
col_vec  <- vec[c(T, F)]

UDXISCPROD %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(replace_0s = TRUE, col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = UDXISCPROD[["age"]] %>% table())
2022
2021
2020
2019
2018
combi-Women-2022 combi-Men-2022 combi-Women-2021 combi-Men-2021 combi-Women-2020 combi-Men-2020 combi-Women-2019 combi-Men-2019 combi-Women-2018 combi-Men-2018
35-39 years
Lower secondary education 681 1.153 627 1.068 632 1.037 614 986 626 936
Upper secondary education 112 83 106 71 91 63 82 73 78 76
Vocational education and training 577 648 561 685 556 667 516 657 470 633
Supplementary examination courses 45 31 54 37 75 43 97 48 113 65
Short-cycle higher education 82 74 89 69 87 76 77 67 76 80
Bachelors programme 37 15 35 13 35 13 32 18 34 17
Professional bachelors programme 299 102 319 98 300 94 295 93 286 82
Masters programme 103 63 105 68 86 70 81 76 96 72
Phd. Programmes 5 1 6 3 6 1 2 0 4 3

Employment


GS Main employment for permanent residents by industry and gender
# Import
url <- paste0("https://bank.stat.gl/api/v1/", language, "/Greenland/AR/AR30/ARXBFB01.px")

ARXBFB01_raw <-
  url |> 
  statgl_fetch(
    industry             = c("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16"),
    gender               = c("M","K"),
    "inventory variable" = "G",
    time                 = px_all(),
    .col_code            = T
  ) |> 
  as_tibble()

# Transform
ARXBFB01 <-
  ARXBFB01_raw %>% 
  mutate(
    time     = time %>% make_date(),
    industry = industry %>% fct_reorder(value) %>% fct_rev()
    ) %>% 
  arrange(industry)

# Plot
ARXBFB01 %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = gender
    )) +
  geom_area() +
  facet_wrap(~ industry, scales = "free", labeller = label_wrap_gen()) +
  theme_statgl(base_size = 8) + 
  scale_fill_statgl(reverse = TRUE) +
  scale_y_continuous(labels = scales::unit_format(
    suffix       = " ",
    big.mark     = ".",
    decimal.mark = ","
    )) +
    labs(
      title = unique(ARXBFB01[[4]]),
      subtitle = sdg5$figs$fig7$title[language],
      x        = " ",
      y        = sdg5$figs$fig7$y_lab[language],
      fill     = " ",
      caption  = sdg5$figs$fig7$cap[language]
      )

StatBank

Method


ARXBFB01 <- 
  ARXBFB01_raw %>% 
  filter(time >= year(Sys.time()) - 6) %>% 
  mutate(industry = industry %>% fct_reorder(value) %>% fct_rev()) %>% 
  arrange(industry, time) %>% 
  unite(combi, 2, 3, sep = ",") %>% 
  mutate(combi = combi %>% factor(levels = unique(combi))) %>% 
  spread(2, ncol(.))

vec      <- ARXBFB01 %>% select(-(1:2)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(F, T)] %>% table()
col_vec  <- vec[c(T, F)]

ARXBFB01 %>% 
  select(-2) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = ARXBFB01[[2]] %>% table())
2018
2019
2020
2021
2022
Men,2018 Women,2018 Men,2019 Women,2019 Men,2020 Women,2020 Men,2021 Women,2021 Men,2022 Women,2022
Number of main employed persons in average per month
Public administration and service 3.782 8.540 3.810 8.721 3.889 8.859 3.968 8.928 3.941 8.932
Fishing and other related industries 3.979 708 4.009 716 3.880 719 3.680 683 3.672 671
Wholesale and retail trade 1.482 1.387 1.488 1.424 1.498 1.417 1.540 1.485 1.556 1.519
Construction 1.781 168 1.773 175 1.850 179 2.089 206 2.102 205
Transportation and storage 1.477 464 1.525 488 1.521 457 1.505 446 1.560 483
Accommodation and food service activities 341 406 336 382 310 351 351 425 363 466
Information and communication 451 205 431 197 419 196 413 195 379 184
Administrative and support service activities 313 212 296 187 297 165 248 152 243 159
Energy and watersupply 355 68 362 75 360 77 358 77 348 69
Other service industries 169 151 171 165 153 152 155 151 158 161
Professional, scientific and technical activities 144 117 151 111 158 109 174 116 176 123
Real estate activities 136 98 159 103 170 106 166 103 180 118
Manufacturing 159 42 159 49 166 47 173 50 176 52
Financial and insurance activities 58 110 63 122 75 127 72 128 64 137
Mining and quarrying 67 29 66 25 65 25 85 34 73 34
Agriculture, forestry and related industries 82 17 81 19 85 19 92 18 80 18

Unemployment


GS Unemployment rate by gender
# Import

url <- paste0("https://bank.stat.gl/api/v1/", language, "/Greenland/AR/AR40/ARXLED3.px")

ARXLED3_raw <-
  url |> 
  statgl_fetch(
    gender               = c("M", "K"),
    age                  = px_all(),
    time                 = px_all(),
    "inventory variable" = "P",
    .col_code            = T
  ) |> 
  as_tibble()

# Transform
ARXLED3 <-
  ARXLED3_raw %>% 
  mutate(
    time = time %>% make_date(),
    age  = age %>% factor(levels = unique(age))
    )

# Plot
ARXLED3 %>% 
  ggplot(aes(
    x     = time, 
    y     = value,
    color = gender
    )) +
  geom_line(size = 1.5) +
  facet_wrap(~ age, scales = "free") +
  theme_statgl() + scale_color_statgl(reverse = TRUE) +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1,
    accuracy     = 1,
    big.mark     = ".",
    decimal.mark = ",")) +
  labs(
    title    = sdg5$figs$fig8$title[language],
    subtitle = sdg5$figs$fig8$sub[language],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg5$figs$fig8$cap[language]
    )

StatBank

Method


ARXLED3 <- 
  ARXLED3_raw %>% 
  select(-`inventory variable`) |> 
  mutate(
    age = age %>% fct_inorder(),
    time = time %>% as.numeric()
    ) %>% 
  filter(time > max(time) - 5) %>% 
  arrange(age, time) %>% 
  unite(combi, time, gender, sep = ",") %>% 
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(combi, value)
  
vec      <- ARXLED3 %>% select(-1) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(T, F)] %>% table()
col_vec  <- vec[c(F, T)]


ARXLED3 %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  row_spec(1, bold = TRUE) %>% 
  pack_rows(index = c("Ledighedsprocent" = ARXLED3[[1]] %>% length())) %>% 
  add_footnote(
    sdg5$figs$fig8$foot[language],
    notation = "symbol")
2018
2019
2020
2021
2022
2018,Men 2018,Women 2019,Men 2019,Women 2020,Men 2020,Women 2021,Men 2021,Women 2022,Men 2022,Women
Ledighedsprocent
Total 5,2 4,8 4,6 4,0 4,9 4,2 3,9 3,4 3,4 3,0
18-19 years 11,9 12,5 7,1 8,2 8,4 8,6 7,1 6,4 4,8 5,3
20-24 years 7,1 8,6 6,4 6,1 6,3 6,0 4,8 4,9 4,1 4,4
25-29 years 5,3 5,2 4,8 4,6 4,7 4,2 3,4 3,0 3,4 2,8
30-34 years 4,7 4,5 3,9 4,1 4,2 4,5 3,2 3,4 3,4 3,1
35-39 years 4,9 4,3 4,4 3,6 4,4 4,1 3,1 3,2 2,8 2,8
40-44 years 4,2 3,7 4,1 3,2 4,4 3,4 3,5 3,2 2,9 2,4
45-49 years 4,7 3,8 4,3 3,7 4,0 3,8 3,1 2,7 2,6 2,1
50-54 years 4,4 4,2 4,5 3,3 5,1 3,7 4,3 3,7 3,8 3,0
55-59 years 4,9 3,5 4,1 3,3 4,9 3,6 4,4 3,2 3,6 2,8
60 years-retirement age 5,7 3,0 5,0 3,0 5,3 2,7 4,1 2,9 3,9 3,0
* Percentage, average unemployment per month among residents aged 18-65

Life expectancy


GS Life expectancy for 0 and 1-year-olds by gender
# Import
BEXDT5A_raw <-
  statgl_url("BEXDT5A", lang = language) %>% 
  statgl_fetch(type   = "E",
               gender = c("M", "K"),
               time   = px_all(),
               age    = 0:1,
               .col_code = TRUE) %>% 
  as_tibble()

# Transform
BEXDT5A <- 
  BEXDT5A_raw %>% 
    separate(time, c("startar", "slutar"),  " - ") %>% 
  mutate(slutar = slutar %>% make_date())

# Plot
BEXDT5A %>% 
  ggplot(aes(
    x     = slutar,
    y     = value,
    color = gender
    )) +
  geom_line(size = 2) +
  facet_wrap(~ age) +
    theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  theme(plot.margin = margin(10, 10, 10, 10)) +
  labs(
    title    = sdg5$figs$fig9$title[language],
    subtitle = sdg5$figs$fig9$sub[language],
    x        = sdg5$figs$fig9$x_lab[language],
    y        = sdg5$figs$fig9$y_lab[language],
    color    = " ",
    caption  = sdg5$figs$fig9$cap[language]
    )

StatBank


# Transform
BEXDT5A <-
  BEXDT5A_raw %>% 
  arrange(desc(time), age) %>% 
  unite(combi, 2, 3, sep = ",") %>% 
  mutate(combi = combi %>% factor(levels = unique(combi))) %>% 
  spread(2, 4) %>% 
  arrange(desc(time)) %>% 
  mutate(timetime = time) %>% 
  separate(timetime, c("time1", "time2"), " - ") %>% 
  filter(time >= year(Sys.time()) - 10) %>% 
  select(-c("time1", "time2"))

vec      <- BEXDT5A %>% select(-(1:2)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(F, T)] %>% table()
col_vec  <- vec[c(T, F)]

# Table
BEXDT5A %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = BEXDT5A[[1]] %>% table()) %>% 
  add_footnote(
    sdg5$figs$fig9$foot[language], 
    notation = "symbol"
    )
0
1
Men,0 Women,0 Men,1 Women,1
Life Expectancy
2015 - 2019 68,3 73 68,1 72,5
2014 - 2018 68,8 73 68,6 72,3
* Life expectancy for 0 and 1-year-olds, persons born in Greenland.


Maternity benefits

FN 5.4.1
# Import
SOX007_raw <- 
  statgl_url("SOX007", lang = language) |> 
  statgl_fetch(
    gender    = 1:2,
    type      = 30,
    time      = px_all(),
    .col_code = T
  ) |> 
  as_tibble()

# Transform
SOX007 <- 
  SOX007_raw |> 
  mutate(value = as.numeric(value)) |> 
  select(-2)


# Plot
SOX007 |> 
  ggplot(aes(
    x     = as.integer(time),
    y     = value,
    color = gender
  )) +
  geom_line(size = 2) +
  theme_statgl() +
  scale_color_statgl() +
  labs(
    title   = sdg5$figs$fig10$title[language],
    x       = " ",
    y       = " ",
    color   = " ",
    caption = sdg5$figs$fig10$cap[language]
  )

StatBank


SOX007 |> 
  filter(time >= year(Sys.time()) - 6) |> 
  spread(time, value) |> 
  rename(" " = 1) |> 
  statgl_table() |> 
  add_footnote(sdg5$figs$fig10$foot[language], notation = "symbol")
2018 2019 2020 2021 2022
Man 185 190 165 148 128
Woman 838 897 867 834 718
* Number of persons